1. Field of the Invention
The present invention relates to a pattern detector for detecting a reference mark or marks formed, for example, on a printed circuit board. The pattern detector is generally employed in an apparatus for automatically properly mounting chip components such as, for example, semiconductor chips on the circuit board.
2. Description of the Prior Art
Apparatus for automatically mounting chip components on a printed circuit board or the like generally require a pattern detector for detecting a reference mark or marks formed thereon so that the chip components may be properly placed thereon. The reference marks are formed in the proximity of the location where each of the chip components is placed. Proper placement of the chip components is achieved upon detection of the posture or inclination of each of the reference marks. In conventional pattern detectors, the reference marks are detected by a template matching method using a binary template.
FIG. 1 depicts a block diagram of a conventional pattern detector employing the template matching method. The pattern detector of FIG. 1 comprises a camera 2 for conducting image pick-up with respect to a reference mark formed on a circuit board 1, an analog-to-digital conversion circuit 3 for converting an analog image signal to a digital signal, a degree-of-coincidence calculation circuit 4 for calculating the degree of coincidence, a reference template storage memory 5 for storing a reference template, a degree-of-coincidence storage memory 6 for storing the degree of coincidence, and a central operating portion 7.
In the above-described pattern detector, image pick-up is initially conducted by the camera 2 with respect to the reference mark formed on the circuit board 1. The general location of the reference mark is inputted in advance into the pattern detector. The camera 2 outputs an analog image signal to the analog-to-digital conversion circuit 3, which converts the analog image signal outputted from the camera 2 into image data in binary form. The image data are then inputted into the degree-of-coincidence calculation circuit 4, in which the inputted binary image data are compared pixel by pixel with reference template data stored in advance in the reference template storage memory 5. The degree-of-coincidence storage memory 6 stores the total number of pixels in coincidence with those of the reference template data, and the central operating portion 7 refers to the contents of the degree-of-coincidence storage memory 6 so that those of the image data that are the highest in the degree of coincidence may be detected as a pattern in coincidence with the reference pattern.
FIGS. 2a and 2b indicate how to calculate the degree of coincidence in the degree-of-coincidence calculation circuit 4.
As shown in FIG. 2a, binary image data 8 outputted from the analog-to-digital conversion circuit 3 are formulated into a set of two-dimensional data 11 of four bits by a shift register 9 and one-line delay circuits 10.
FIG. 2b depicts reference template data 12 stored in advance in the reference template storage memory 5. The template data 12 are compared pixel by pixel with the two-dimensional data 11 on the same coordinates, and the total number of coincidental pixels is defined as the degree of coincidence. The degree of coincidence shown in FIG. 2b is thirteen.
In the conventional pattern detector having the above-described construction, however, the pattern detection is difficult when a target pattern to be detected rotates or inclines with respect to the reference pattern.
Furthermore, if the reference pattern is large, the time period required for processings becomes long because a large reference pattern has a great number of pixels to be processed. Accordingly, the large reference pattern is not practical.